package com.situ.cloud.common.vo;


import lombok.Data;

@Data
public class RS {

    private int code;//0代表成功

    private String msg;

    private Object data;

    private Long count;

    public static RS ok() {
        return new RS();
    }

    public static RS ok(Object data) {
        RS rs = new RS();
        rs.setData(data);
        return rs;
    }

    public static RS fail(String msg) {
        return fail(-1, msg);
    }

    public static RS fail(int code, String msg) {
        RS rs = new RS();
        rs.setCode(code);
        rs.setMsg(msg);
        return rs;
    }

}
